home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
F1 Licenseware
/
F1 Licenseware - Volume 1.iso
/
disks
/
089a.dms
/
089a.adf
/
EXAMPLE_PROGRAMS
/
example04.AMOS
/
example04.amosSourceCode
Wrap
AMOS Source Code
|
1992-03-06
|
2KB
|
60 lines
'====================
'EXAMPLE PROGRAM FOUR
'====================
'
'A program to print any times table from 1 to 99
'
'
Rem Remove the mouse pointer,set text background
Rem to black and clear the screen to black, see EXAMPLE1 and EXAMPLE2
'------------------------------------------------------------------
Hide : Paper 0 : Cls 0
Rem ask the user what table they want displayed and store that number in TT
'-------------------------------------------------------------------------
Line Input "TYPE IN A NUMBER 1-99 ";TT
Rem clear the screen to red and set the paper colour to red and turn curs off
'--------------------------------------------------------------------------------
Cls 4 : Paper 4 : Curs Off
Rem set the for next loop starting at 1 and ending at 12
'--------------------------------------------------------
For A=1 To 12
Rem print the calculation A*TT to the screen
'--------------------------------------------
Print A*TT
Rem Amos now INCrements A automatically and checks to see if A is less than 12
Rem which is the maximum we have asked it to go to , change it if you like.
Rem If A is less than 12 Amos will jump back to do the next calculation.
'------------------------------------------------------------------------------
Next A
Rem If A was more than or equal to 12 it will arrive here, where Amos waits
Rem for a key press from you then jumps back to the editor.
'----------------------------------------------------------------------------
Wait Key : Edit
'============================================================================
'By trying to keep things simple this programis severely lacking in certain
'places. For exaple the user can type ANY number in and it would be nice to
'have the table numbered 1 to 12 down the side of each calculation.
'This is fairly simple to do. Do you think you could manage it?
'Why not have a go. A few hints: The loop counter (A) holds the number you need
'to PRINT along side the calculation. To stop the program accepting an input
'of more than 99 will require an IF THEN test which we haven't covered yet.
'Why not come back here and try to implement this change when you have learned
'about IF and THEN? Go on, I dare ya!
'==============================================================================
'